{
Miranda ICQ: the free icq client for MS Windows 
Copyright (C) 2000-2  Richard Hughes, Roland Rabien & Tristan Van de Vreede

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
}

////////////////////////////////////
//Extra Image Column Support +0.5.0.0

//Extra columns type.
//column arranged in this way
//
//  [statusicon] ContactName  [ADV1][ADV2][SMS][EMAIL][PROTO]
//
{$IFNDEF M_CLUIFRAMES}
{$DEFINE M_CLUIFRAMES}
const
  EXTRA_ICON_EMAIL = 1;
  EXTRA_ICON_PROTO = 2;
  EXTRA_ICON_SMS   = 3;
  EXTRA_ICON_ADV1  = 4;
  EXTRA_ICON_ADV2  = 5;

type
  PIconExtraColumn = ^TIconExtraColumn;
  TIconExtraColumn = record
    cbSize    :int;     //must be sizeof(IconExtraColumn)
    ColumnType:int;
    hImage    :THANDLE; //return value from MS_CLIST_EXTRA_ADD_ICON
  end;

const
//Set icon for contact at needed column
//wparam=hContact
//lparam=pIconExtraColumn
//return 0 on success,-1 on failure
//
//See above for supported columns
  MS_CLIST_EXTRA_SET_ICON = 'CListFrames/SetIconForExraColumn';

//Adding icon to extra image list. 
//Call this in ME_CLIST_EXTRA_LIST_REBUILD event
//
//wparam=hIcon
//lparam=0
//return hImage on success,-1 on failure
  MS_CLIST_EXTRA_ADD_ICON = 'CListFrames/AddIconToExtraImageList';

  ME_CLIST_EXTRA_LIST_REBUILD = 'CListFrames/OnExtraListRebuild';

//called with wparam=hContact
  ME_CLIST_EXTRA_IMAGE_APPLY = 'CListFrames/OnExtraImageApply';

///////////////////////////////////
//
//want show tooltip for statusbar
//wparam=(char *)protocolname
//lparam=0
  ME_CLIST_FRAMES_SB_SHOW_TOOLTIP = 'CListFrames/StatusBarShowToolTip';

//want hide tooltip for statusbar
//wparam=lparam=0
  ME_CLIST_FRAMES_SB_HIDE_TOOLTIP = 'CListFrames/StatusBarHideToolTip';

//adds a frame window
//wParam=(CLISTFrame*)
//lParam=0
//returns an integer, the frame id.
type
  PCLISTFrame = ^TCLISTFrame;
  TCLISTFrame = record
    cbSize:dword;
    hWnd  :hwnd;
    hIcon :HICON;
    align :int;   // al flags below
    height:int;
    Flags :int;   // F_flags below
    name  :PChar; // frame window name,will be shown in menu
    TBname:PChar; // titlebar caption
  // TBBackColour:COLORREF; //titlebar background colour
  end;
  PtagCLISTFrame = PCLISTFrame;
  tagCLISTFrame  = TCLISTFrame;

const
  F_VISIBLE     = 1;  // Frame visible
  F_SHOWTB      = 2;  // Show TitleBar
  F_UNCOLLAPSED = 4;  // UnCollapse frame
  F_LOCKED      = 8;  // Lock Frame
  F_NOBORDER    = 16; // Dont apply WS_BORDER style for window
  F_SHOWTBTIP   = 32; // Show titlebar tooltip

// frame alignment
  alTop    = $00000001;
  alBottom = $00000002;
  alClient = $00000004; // only one alClient frame 

  MS_CLIST_FRAMES_ADDFRAME = 'CListFrames/AddFrame';

// remove frame
// wParam=Frame Id
// lParam=0
// window with hWnd field in CLISTFrame will be destroyed!!
  MS_CLIST_FRAMES_REMOVEFRAME = 'CListFrames/RemoveFrame';

//shows all frames
//wParam=lParam=0
//returns 0 on success, -1 on failure
  MS_CLIST_FRAMES_SHOWALLFRAMES = 'CListFrames/ShowALLFrames';

//shows the titlebars of all frames
//wParam=lParam=0
//returns 0 on success, -1 on failure
  MS_CLIST_FRAMES_SHOWALLFRAMESTB = 'CListFrames/ShowALLFramesTB';

//hides the titlebars of all frames
//wParam=lParam=0
//returns 0 on success, -1 on failure
  MS_CLIST_FRAMES_HIDEALLFRAMESTB = 'CListFrames/HideALLFramesTB';

//shows the frame if it is hidden,
//hides the frame if it is shown
//wParam=FrameId
//lParam=0
//returns 0 on success, -1 on failure
  MS_CLIST_FRAMES_SHFRAME = 'CListFrames/SHFrame';

//shows the frame titlebar if it is hidden,
//hides the frame titlebar if it is shown
//wParam=FrameId
//lParam=0
//returns 0 on success, -1 on failure
  MS_CLIST_FRAMES_SHFRAMETITLEBAR = 'CListFrame/SHFrameTitleBar';

//locks the frame if it is unlocked,
//unlock the frame if it is locked
//wParam=FrameId
//lParam=0
//returns 0 on success, -1 on failure
  MS_CLIST_FRAMES_ULFRAME = 'CListFrame/ULFrame';

//collapses the frame if it is uncollapsed,
//uncollapses the frame if it is collapsed
//wParam=FrameId
//lParam=0
//returns 0 on success, -1 on failure
  MS_CLIST_FRAMES_UCOLLFRAME = 'CListFrame/UCOLLFrame';

//trigger border flags
//wparam=frameid
//lparam=0
  MS_CLIST_FRAMES_SETUNBORDER = 'CListFrame/SetUnBorder';

//redraws the frame
//wParam=FrameId, -1 for all frames
//lparam=FU_flags
//returns a pointer to option, -1 on failure
  FU_TBREDRAW = 1; // redraw titlebar
  FU_FMREDRAW = 2; // redraw Frame
  FU_FMPOS    = 4; // update Frame position

  MS_CLIST_FRAMES_UPDATEFRAME = 'CListFrame/UpdateFrame';

//gets the frame options
//(HIWORD)wParam=FrameId
//(LOWORD)wParam=FO_flag
//lParam=0
//returns a pointer to option, -1 on failure
  FO_FLAGS     = $0001; // set of F_VISIBLE,F_SHOWTB,F_UNCOLLAPSED,F_LOCKED,F_NOBORDER,F_SHOWTBTIP
  FO_NAME      = $0002; // Change name
  FO_TBNAME    = $0003; // Change TB caption
  FO_TBSTYLE   = $0004; // Change TB style
  FO_TBEXSTYLE = $0005; // Change TB exstyle
  FO_ICON      = $0006; // Change icon
  FO_HEIGHT    = $0007; // Change height
  FO_ALIGN     = $0008; // Change align
  FO_TBTIPNAME = $0009; // Change TB tooltip
  FO_FLOATING  = $000a; // Change floating mode

  MS_CLIST_FRAMES_GETFRAMEOPTIONS = 'CListFrame/GetFrameOptions';

//sets the frame options
//(HIWORD)wParam=FrameId
//(LOWORD)wParam=FO_flag
//lParam=value
//returns 0 on success, -1 on failure
  MS_CLIST_FRAMES_SETFRAMEOPTIONS = 'CListFrame/SetFrameOptions';

//menu stuff

//add a new item to the context frame menu
//wParam=0
//lParam=(LPARAM)(CLISTMENUITEM*)&mi
//returns a handle to the new item
//popupposition=frameid
//contactowner=advanced parameter
  MS_CLIST_ADDCONTEXTFRAMEMENUITEM = 'CList/AddContextFrameMenuItem';

//remove a item from context frame menu
//wParam=hMenuItem returned by MS_CLIST_ADDCONTACTMENUITEM
//lParam=0
//returns 0 on success, nonzero on failure
  MS_CLIST_REMOVECONTEXTFRAMEMENUITEM = 'CList/RemoveContextFrameMenuItem';

//builds the context menu for a frame
//wparam=frameid
//lParam=0
//returns a HMENU on success, or NULL on failure
  MS_CLIST_MENUBUILDFRAMECONTEXT = 'CList/BuildContextFrameMenu';

{
//the frame menu is about to be built
wparam=frameid 
lparam=
-1 for build from titlebar,
    use
          MS_CLIST_ADDCONTEXTFRAMEMENUITEM 
          MS_CLIST_REMOVECONTEXTFRAMEMENUITEM

>0 for build in main menu, 
must be popupname=lparam to place your items in right popup of main menu.
    use
          MS_CLIST_ADDMAINMENUITEM
          MS_CLIST_REMOVEMAINMENUITEM

}
  ME_CLIST_PREBUILDFRAMEMENU = 'CList/PreBuildFrameMenu';

//needed by cluiframes module to add frames menu to main menu.
//it just calls NotifyEventHooks(hPreBuildFrameMenuEvent,wParam,lParam);
  MS_CLIST_FRAMEMENUNOTIFY = 'CList/ContextFrameMenuNotify';

//#define FONTID_STATUS 8
//#define FONTID_FRAMETITLE 9

//#undef FONTID_MAX
//#define FONTID_MAX 9

{$ENDIF}